package com.htl.exampro.paper.pojo.domain;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 试卷试题关联表
 * </p>
 *
 * @author hehehe
 * @since 2025-05-26
 */
@Data
@TableName("paper_question")
public class PaperQuestionDO implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;
    public static final String RELATED_ID = "related_id";
    public static final String PAPER_ID = "paper_id";
    public static final String QUESTION_ID = "question_id";
    public static final String SCORE = "score";
    public static final String ORDERBY = "orderby";
    public static final String VERSION = "version";
    public static final String CREATED_PERSON = "created_person";
    public static final String CREATED_TIME = "created_time";
    public static final String UPDATED_PERSON = "updated_person";
    public static final String UPDATED_TIME = "updated_time";
    public static final String IS_DELETED = "is_deleted";
    /**
     * 关联ID
     */
    @TableId(value = "related_id", type = IdType.ASSIGN_ID)
    private Long relatedId;

    /**
     * 试卷ID
     */
    @TableField("paper_id")
    private Long paperId;

    /**
     * 试题ID
     */
    @TableField("question_id")
    private Long questionId;

    /**
     * 题目分值
     */
    @TableField("score")
    private Integer score;

    /**
     * 排序
     */
    @TableField("orderby")
    private Integer orderby;

    /**
     * 试题版本
     */
    @TableField("version")
    private Integer version;

    /**
     * 创建人ID
     */
    @TableField(value = "created_person", fill = FieldFill.INSERT)
    private String createdPerson;

    /**
     * 创建时间
     */
    @TableField("created_time")
    private LocalDateTime createdTime;

    /**
     * 修改人ID
     */
    @TableField(value = "updated_person", fill = FieldFill.UPDATE)
    private String updatedPerson;

    /**
     * 修改时间
     */
    @TableField("updated_time")
    private LocalDateTime updatedTime;

    /**
     * 逻辑删除标志 0-未删除 1-已删除
     */
    @TableLogic
    @TableField("is_deleted")
    private Boolean isDeleted;
}
